package com.hqyj.account.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;

import com.hqyj.commom.entity.AbstractEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;


@Entity
@Table(name="test_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User extends AbstractEntity {
    private String userName;
    private String password;
    @ManyToMany ( mappedBy = "users",cascade = CascadeType.ALL)
    @JsonIgnore
    private List<Role> roles;




}
